Skip to content

Fix Ptest for Cython.#16915

Open
AkarshHCL wants to merge 4 commits intomicrosoft:3.0-devfrom
AkarshHCL:topic-ptest_Cython
Open

Fix Ptest for Cython.#16915
AkarshHCL wants to merge 4 commits intomicrosoft:3.0-devfrom
AkarshHCL:topic-ptest_Cython

Conversation

@AkarshHCL
Copy link
Copy Markdown
Contributor

@AkarshHCL AkarshHCL commented Apr 28, 2026

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

The Cython test suite was failing during %check due to a code formatting violation reported by the upstream style checker (TestCodeFormat). The failure specifically originated from a flake8 error:

E502: redundant backslash between brackets
File affected: Cython/Build/IpythonMagic.py

This issue is purely a style/linting problem and does not impact build correctness or runtime functionality. However, since the upstream test suite enforces formatting checks, it caused the overall test execution to fail.
To resolve this we applied a targeted in-place fix during the %check phase using a sed command. This removes trailing backslashes from affected lines, eliminating the E502 violation

Change Log
  • SPECS/Cython/Cython.spec
Does this affect the toolchain?

Yes

Test Methodology
  • Successful Build Screenshot-
image

@AkarshHCL AkarshHCL requested a review from a team as a code owner April 28, 2026 06:36
@AkarshHCL AkarshHCL marked this pull request as draft April 28, 2026 06:37
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Apr 28, 2026
@Kanishk-Bansal Kanishk-Bansal added the ptest package testing (%check section in spec) label Apr 28, 2026
@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

Buddy Build

@AkarshHCL
Copy link
Copy Markdown
Contributor Author

Buddy build is successful .It had license warnings which I have resolved now.

@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

Buddy Build

@Kanishk-Bansal Kanishk-Bansal marked this pull request as ready for review April 29, 2026 14:24
@AkarshHCL
Copy link
Copy Markdown
Contributor Author

Buddy build is successful with no license warnings.

Copy link
Copy Markdown
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overly broad sed — sed -i '/\$/s/\$//' Cython/Build/IpythonMagic.py strips the trailing backslash from every line ending in , not only the E502 (redundant-backslash-between-brackets) cases. Legitimate Python line continuations elsewhere in the file would also be silently rewritten.

just change in IpythonMagic.py using a patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging ptest package testing (%check section in spec)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants